﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TeamDoer.Models.RegisterModel>" %>
<%@ Import Namespace="TeamDoer" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Register
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Create a New Account</h2>
    <p>
        Fill three simple feilds to create a new account. 
    </p>

    <% using (Html.BeginForm()) { %>
        <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
        <div>
            <fieldset>
                <legend>Account Information</legend>

                <div class="editor-label">
                    <b><%: Html.LabelFor(m => m.UserName) %></b>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.UserName) %>
                    <%: Html.ValidationMessageFor(m => m.UserName) %>
                </div>

				<div class="editor-label">
                    <b><%: Html.LabelFor(m => m.Password) %></b> <span class="small">(<%: ViewData["PasswordLength"] %> chars min)</span>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.Password) %>
                    <%: Html.ValidationMessageFor(m => m.Password) %>
                </div>

				<div class="editor-label">
                    <b><%: Html.LabelFor(m => m.Email) %></b>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Email) %>
                    <%: Html.ValidationMessageFor(m => m.Email) %>
                </div>

				<div class="editor-label">
                    <%: Html.LabelFor(m => m.FirstName) %> (optional)
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.FirstName)%>
                    <%: Html.ValidationMessageFor(m => m.FirstName)%>
                </div>

				<div class="editor-label">
                    <%: Html.LabelFor(m => m.LastName) %>  (optional)
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.LastName) %>
                    <%: Html.ValidationMessageFor(m => m.LastName)%>
                </div>
                
                <input type="submit" value="Register" />
                
            </fieldset>
        </div>
    <% } %>
</asp:Content>
